import request from '@/utils/request'

// 获取所有权限点
export function getPermissionList(){
    return request.get('/sys/permission')
}

// 根据ID获取权限点详情
export function getPermissionDetail(id){
    return request.get(`/sys/permission/${id}`)
}


// 根据ID更新权限点详情
export function updatePermission(data){
    return request.put(`/sys/permission/${data.id}`,data)
}


// 新增
export function addPermission(data){
    return request.post('/sys/permission',data)
}

// 根据id删除权限点
export function deletePermission(id){
    return request.delete(`/sys/permission/${id}`)
}

// 